﻿namespace DoNet.Wechat.MP.Common.Entitys
{
    public class CallBackCheckResult : JsonResult
    {
        /// <summary>
        /// dns结果列表
        /// </summary>
        public List<dnsItem> dns { get; set; } = new List<dnsItem>();
        /// <summary>
        /// ping结果列表
        /// </summary>
        public List<pingItem> ping { get; set; } = new List<pingItem>();
    }

    public class dnsItem
    {
        /// <summary>
        /// 解析出来的ip
        /// </summary>
        public string ip { get; set; } = string.Empty;
        /// <summary>
        /// ip对应的运营商
        /// </summary>
        public string real_operator { get; set; } = string.Empty;
    }
    public class pingItem
    {
        /// <summary>
        /// ping的ip，执行命令为ping ip –c 1-w 1 -q
        /// </summary>
        public string ip { get; set; } = string.Empty;
        /// <summary>
        /// ping的源头的运营商，由请求中的check_operator控制
        /// </summary>
        public string from_operator { get; set; } = string.Empty;
        /// <summary>
        /// ping的丢包率，0%表示无丢包，100%表示全部丢包。因为目前仅发送一个ping包，因此取值仅有0%或者100%两种可能。
        /// </summary>
        public string package_loss { get; set; } = string.Empty;
        /// <summary>
        /// ping的耗时，取ping结果的avg耗时。
        /// </summary>
        public string time { get; set; } = string.Empty;
    }
}
